<template>
	<view class="box">

		<view class="hezi">
			<view class="top">
				提现金额
			</view>
			<view class="inu">
				<view class="left">
					<span>￥</span>
					<input type="text" placeholder="请输入提现金额" v-model="qwe.amount" />
				</view>
				<view class="right" @click="allt">
					<span>全部提现</span>
				</view>
			</view>
			<view class="bom">
				<span>· 当前账户余额:{{ass.amount}}</span>
			</view>
		</view>
		<button @click="submit()">提现</button>

	</view>
</template>

<script>
	import {
		flowwallet,
		walletout
	} from '../../common/http.api.js'
	export default {
		data() {
			return {
				ass: {},
				qwe: {
					amount: ''
				}
			}
		},
		onLoad() {
			this.gitlist()
		},
		methods: {
			gitlist() {
				let arr = {}
				flowwallet(arr).then(res => {
					this.ass = res.data
				})
			},
			submit() {
				walletout(this.qwe).then(res => {
					if (res.code == 200) {
						uni.navigateBack()
					}
				})
			},
			allt(){
				this.qwe.amount = this.ass.amount
			}
		}
	}
</script>

<style lang="scss" scoped>
	button {
		width: 677rpx;
		height: 80rpx;
		background: linear-gradient(84deg, #24180D 0%, #594629 100%);
		border-radius: 40rpx;
		margin-top: 100rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		font-size: 28rpx;
		color: #FFFFFF;
		line-height: 33rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.hezi {
		width: 650rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		margin-top: 20rpx;
		padding: 20rpx;

		.bom {
			margin-top: 20rpx;
			font-family: PingFang SC;
			font-weight: 800;
			font-size: 26rpx;
			color: #939393;
			line-height: 67rpx;
		}

		.inu {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 30rpx;
			border-bottom: 1px solid #eeeeee;
			padding-bottom: 10rpx;

			.left {
				display: flex;
				align-items: center;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 40rpx;
				color: #101010;
				line-height: 65rpx;

				input {
					font-size: 40rpx;
				}
			}

			.right {
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 23rpx;
				color: #FF6E29;
			}
		}

		.top {
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 26rpx;
			color: #333333;
		}
	}
</style>